home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Archivers / ZLib / Makefile.in < prev    next >
Encoding:
Makefile  |  1998-02-20  |  3.6 KB  |  140 lines

  1. # Makefile for zlib
  2. # Copyright (C) 1995-1996 Jean-loup Gailly.
  3. # For conditions of distribution and use, see copyright notice in zlib.h 
  4.  
  5. # To compile and test, type:
  6. #   ./configure; make test
  7. # The call of configure is optional if you don't have special requirements
  8.  
  9. # To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
  10. #    make install
  11. # To install in $HOME instead of /usr/local, use:
  12. #    make install prefix=$HOME
  13.  
  14. CC=cc
  15.  
  16. CFLAGS=-O
  17. #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
  18. #CFLAGS=-g -DDEBUG
  19. #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
  20. #           -Wstrict-prototypes -Wmissing-prototypes
  21.  
  22. SHLIB = libz.sl
  23. ARLIB = libz.a
  24.  
  25. LDSHARED=ld -b -s
  26.  
  27. VER=1.0.4
  28. LIBS=$(ARLIB) $(SHLIB)
  29.  
  30. AR=ar rc
  31. RANLIB=ranlib
  32. TAR=tar
  33.  
  34. prefix=/usr/local
  35. exec_prefix = $(prefix)
  36.  
  37. incdir=$(prefix)/include
  38. libdir=$(prefix)/lib
  39. LDFLAGS=-L$(libdir) -lz
  40.  
  41. OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
  42.        zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
  43.  
  44. TEST_OBJS = example.o minigzip.o
  45.  
  46. DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms \
  47.         zlib.def zlib.rc algorithm.doc  *.[ch]
  48.  
  49. all: $(LIBS)
  50.  
  51. test: example minigzip
  52.     ./example
  53.     echo hello world | ./minigzip | ./minigzip -d 
  54.  
  55. $(ARLIB): $(OBJS)
  56.     $(AR) $@ $(OBJS)
  57.  
  58. $(SHLIB): $(OBJS)
  59.     $(LDSHARED) -o $@ $(OBJS)
  60.  
  61. example: example.o install_shlib install_arlib
  62.     $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
  63.  
  64. minigzip: minigzip.o install_shlib install_arlib
  65.     $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
  66.  
  67. install: install_arlib install_shlib install_incs
  68.  
  69. install_shlib: $(SHLIB)
  70.     -mkdir -p $(libdir)
  71.     -cp $(SHLIB) $(libdir)
  72.     -chmod 755 $(libdir)/$(SHLIB) $(libdir)
  73.  
  74. install_arlib: $(ARLIB)
  75.     -mkdir -p $(libdir)
  76.     -cp $(ARLIB) $(libdir)
  77.     -chmod 644 $(libdir)/$(ARLIB)
  78.  
  79. install_incs:
  80.     -mkdir -p $(incdir)
  81.     -chmod 755 $(incdir)
  82.     -cp zlib.h zconf.h $(incdir)
  83.     -chmod 644 $(incdir)/*.h
  84.  
  85. uninstall:
  86.     cd $(exec_prefix)/lib; rm -f $(LIBS); \
  87.     if test -f libz.so; then \
  88.      v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\
  89.      rm -f libz.so.$$v libz.so; \
  90.     fi
  91.     cd $(prefix)/include; rm -f zlib.h zconf.h
  92.  
  93. clean:
  94.     rm -f *.o *~ example minigzip libz.a libz.sl libz.so* foo.gz ztest*.c
  95.  
  96. zip:
  97.     mv Makefile Makefile~; cp -p Makefile.in Makefile
  98.     v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
  99.     zip -ul9 zlib$$v $(DISTFILES)
  100.     mv Makefile~ Makefile
  101.  
  102. dist:
  103.     mv Makefile Makefile~; cp -p Makefile.in Makefile
  104.     d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
  105.     rm -f $$d.tar.gz; \
  106.     if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
  107.     files=""; \
  108.     for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
  109.     cd ..; \
  110.     GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
  111.     if test ! -d $$d; then rm -f $$d; fi
  112.     mv Makefile~ Makefile
  113.  
  114. tags:    
  115.     etags *.[ch]
  116.  
  117. depend:
  118.     makedepend -- $(CFLAGS) -- *.[ch]
  119.  
  120. # DO NOT DELETE THIS LINE -- make depend depends on it.
  121.  
  122. adler32.o: zlib.h zconf.h
  123. compress.o: zlib.h zconf.h
  124. crc32.o: zlib.h zconf.h
  125. deflate.o: deflate.h zutil.h zlib.h zconf.h
  126. example.o: zlib.h zconf.h
  127. gzio.o: zutil.h zlib.h zconf.h
  128. infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h
  129. infcodes.o: zutil.h zlib.h zconf.h
  130. infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h
  131. inffast.o: zutil.h zlib.h zconf.h inftrees.h
  132. inffast.o: infblock.h infcodes.h infutil.h inffast.h
  133. inflate.o: zutil.h zlib.h zconf.h infblock.h
  134. inftrees.o: zutil.h zlib.h zconf.h inftrees.h
  135. infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
  136. minigzip.o:  zlib.h zconf.h 
  137. trees.o: deflate.h zutil.h zlib.h zconf.h 
  138. uncompr.o: zlib.h zconf.h
  139. zutil.o: zutil.h zlib.h zconf.h  
  140.